Rebase patches
authorStuart Prescott <stuart@debian.org>
Sat, 15 Feb 2025 14:30:40 +0000 (01:30 +1100)
committerStuart Prescott <stuart@debian.org>
Tue, 18 Feb 2025 08:57:28 +0000 (19:57 +1100)
debian/patches/0001-test-with-current-interpreter.patch
debian/patches/0003-Fix-missing-subparser-in-test-harness.patch
debian/patches/0005-Fix-numpy-header-detection.patch
debian/patches/0010-Add-Python-3.13-as-supported-version.patch [deleted file]
debian/patches/0011-Upstream-patch-for-3.13-opcodes.patch [deleted file]
debian/patches/series

index 3509bbd9234abe2ff90ae37f57842100631e7af3..e32857b40520270abd48cc6a020972847318d5c0 100644 (file)
@@ -10,10 +10,10 @@ matter what the current interpreter is.
  1 file changed, 5 insertions(+)
 
 diff --git a/testing/buildlog.py b/testing/buildlog.py
-index f82191f..38538dd 100644
+index 90ff436..034f103 100644
 --- a/testing/buildlog.py
 +++ b/testing/buildlog.py
-@@ -62,6 +62,11 @@ class BuildLog(object):
+@@ -63,6 +63,11 @@ class BuildLog:
                      )
                      sys.exit(1)
  
index 02a6497ded3817cae95965b784537e88603fd0ce..346ce735fdc222028354e197c6a2b9a41b2af683 100644 (file)
@@ -8,10 +8,10 @@ Not needed in the build but needed for debugging the test harness...
  1 file changed, 1 insertion(+)
 
 diff --git a/testing/command.py b/testing/command.py
-index 31a48f8..859ebf1 100644
+index be4ed8a..e0b73d0 100644
 --- a/testing/command.py
 +++ b/testing/command.py
-@@ -194,6 +194,7 @@ def main():
+@@ -199,6 +199,7 @@ def main():
          type=int,
          help="use build number n (0-based), latest = -1 (default)",
      )
index 56b4a7219b69707796a335121faf455626e31aba..c0f5cc923a01150079b89581425475c66f4fd565 100644 (file)
@@ -1,5 +1,5 @@
 From: Stuart Prescott <stuart@debian.org>
-Date: Thu, 9 Jan 2025 15:45:36 +1100
+Date: Sun, 16 Feb 2025 01:27:09 +1100
 Subject: Fix numpy header detection
 
 Existing code makes assumptions about site-packages/dist-packages
@@ -9,10 +9,10 @@ and fails to find the headers; numpy has an explicit function for this
  1 file changed, 2 insertions(+), 11 deletions(-)
 
 diff --git a/build_scripts/utils.py b/build_scripts/utils.py
-index 311c67f..8121c8d 100644
+index 29f2545..d5c1063 100644
 --- a/build_scripts/utils.py
 +++ b/build_scripts/utils.py
-@@ -67,17 +67,8 @@ def update_env_path(newpaths):
+@@ -77,17 +77,8 @@ def update_env_path(newpaths):
  
  
  def get_numpy_location():
diff --git a/debian/patches/0010-Add-Python-3.13-as-supported-version.patch b/debian/patches/0010-Add-Python-3.13-as-supported-version.patch
deleted file mode 100644 (file)
index 6ba1f77..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From: Stuart Prescott <stuart@debian.org>
-Date: Thu, 26 Dec 2024 17:32:21 +1100
-Subject: Add Python 3.13 as supported version
-
----
- build_scripts/config.py             | 3 ++-
- wheel_artifacts/pyproject.toml.base | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/build_scripts/config.py b/build_scripts/config.py
-index 5a2f665..e7f4ae4 100644
---- a/build_scripts/config.py
-+++ b/build_scripts/config.py
-@@ -65,6 +65,7 @@ class Config(object):
-             'Programming Language :: Python :: 3.10',
-             'Programming Language :: Python :: 3.11',
-             'Programming Language :: Python :: 3.12',
-+            'Programming Language :: Python :: 3.13',
-         ]
-         self.setup_script_dir = None
-@@ -115,7 +116,7 @@ class Config(object):
-         setup_kwargs['zip_safe'] = False
-         setup_kwargs['cmdclass'] = cmd_class_dict
-         setup_kwargs['version'] = package_version
--        setup_kwargs['python_requires'] = ">=3.9, <3.13"
-+        setup_kwargs['python_requires'] = ">=3.9, <3.14"
-         if log_level == LogLevel.QUIET:
-             # Tells setuptools to be quiet, and only print warnings or errors.
-diff --git a/wheel_artifacts/pyproject.toml.base b/wheel_artifacts/pyproject.toml.base
-index 2e30e9a..5e73b2b 100644
---- a/wheel_artifacts/pyproject.toml.base
-+++ b/wheel_artifacts/pyproject.toml.base
-@@ -10,7 +10,7 @@ authors = [
- description = PROJECT_DESCRIPTION
- readme = PROJECT_README
- dynamic = ["version"]
--requires-python = ">=3.9, <3.13"
-+requires-python = ">=3.9, <3.14"
- keywords = ["Qt"]
- license = {text = "LGPL"}
- dependencies = PROJECT_DEPENDENCIES
-@@ -35,6 +35,7 @@ classifiers = [
-     "Programming Language :: Python :: 3.10",
-     "Programming Language :: Python :: 3.11",
-     "Programming Language :: Python :: 3.12",
-+    "Programming Language :: Python :: 3.13",
-     "Topic :: Database",
-     "Topic :: Software Development",
-     "Topic :: Software Development :: Code Generators",
diff --git a/debian/patches/0011-Upstream-patch-for-3.13-opcodes.patch b/debian/patches/0011-Upstream-patch-for-3.13-opcodes.patch
deleted file mode 100644 (file)
index 29d19fb..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-From: Stuart Prescott <stuart@debian.org>
-Date: Fri, 10 Jan 2025 00:14:14 +1100
-Subject: Upstream patch for 3.13 opcodes
-
-Cherry-pick ad18260e583a30505e42b04fd242c52ff36f735c from upstream
----
- sources/pyside6/tests/pysidetest/enum_test.py     | 41 ++++++++++++++++-------
- sources/shiboken6/libshiboken/sbkfeature_base.cpp | 21 +++++++++---
- sources/shiboken6/libshiboken/sbkmodule.cpp       |  9 +++--
- 3 files changed, 52 insertions(+), 19 deletions(-)
-
-diff --git a/sources/pyside6/tests/pysidetest/enum_test.py b/sources/pyside6/tests/pysidetest/enum_test.py
-index 8328345..7afc5b9 100644
---- a/sources/pyside6/tests/pysidetest/enum_test.py
-+++ b/sources/pyside6/tests/pysidetest/enum_test.py
-@@ -1,4 +1,4 @@
--# Copyright (C) 2022 The Qt Company Ltd.
-+# Copyright (C) 2024 The Qt Company Ltd.
- # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
- import os
-@@ -50,6 +50,8 @@ class ListConnectionTest(unittest.TestCase):
- # PYSIDE-1735: We are testing that opcodes do what they are supposed to do.
- #              This is needed in the PyEnum forgiveness mode where we need
- #              to introspect the code if an Enum was called with no args.
-+
-+# flake8: noqa
- class InvestigateOpcodesTest(unittest.TestCase):
-     def probe_function1(self):
-@@ -162,25 +164,40 @@ class InvestigateOpcodesTest(unittest.TestCase):
-             self.assertEqual(self.read_code(self.probe_function2, adaptive=True), result_3)
-             self.assertEqual(self.get_sizes(self.probe_function2, adaptive=True), sizes_3)
--        if sys.version_info[:2] >= (3, 12):
-+        if sys.version_info[:2] == (3, 12):
--            result_1 = [('RESUME', 151, 0),
--                        ('LOAD_GLOBAL', 116, 0),
--                        ('LOAD_ATTR', 106, 2),
--                        ('STORE_FAST', 125, 1),
-+            result_1 = [('RESUME',       151, 0),
-+                        ('LOAD_GLOBAL',  116, 0),
-+                        ('LOAD_ATTR',    106, 2),
-+                        ('STORE_FAST',   125, 1),
-                         ('RETURN_CONST', 121, 0)]
--            result_2 = [('RESUME', 151, 0),
--                        ('LOAD_GLOBAL', 116, 1),
--                        ('LOAD_ATTR', 106, 2),
--                        ('CALL', 171, 0),
--                        ('STORE_FAST', 125, 1),
-+            result_2 = [('RESUME',       151, 0),
-+                        ('LOAD_GLOBAL',  116, 1),
-+                        ('LOAD_ATTR',    106, 2),
-+                        ('CALL',         171, 0),
-+                        ('STORE_FAST',   125, 1),
-                         ('RETURN_CONST', 121, 0)]
-+        if sys.version_info[:2] >= (3, 13):
-+
-+            result_1 = [('RESUME',       149, 0),
-+                        ('LOAD_GLOBAL',   91, 0),
-+                        ('LOAD_ATTR',     82, 2),
-+                        ('STORE_FAST',   110, 1),
-+                        ('RETURN_CONST', 103, 0)]
-+
-+            result_2 = [('RESUME',       149, 0),
-+                        ('LOAD_GLOBAL',   91, 0),
-+                        ('LOAD_ATTR',     82, 2),
-+                        ('PUSH_NULL',     34, None),
-+                        ('CALL',          53, 0),
-+                        ('STORE_FAST',   110, 1),
-+                        ('RETURN_CONST', 103, 0)]
-+
-         self.assertEqual(self.read_code(self.probe_function1), result_1)
-         self.assertEqual(self.read_code(self.probe_function2), result_2)
- if __name__ == '__main__':
-     unittest.main()
--
-diff --git a/sources/shiboken6/libshiboken/sbkfeature_base.cpp b/sources/shiboken6/libshiboken/sbkfeature_base.cpp
-index fe6f579..07f3ff7 100644
---- a/sources/shiboken6/libshiboken/sbkfeature_base.cpp
-+++ b/sources/shiboken6/libshiboken/sbkfeature_base.cpp
-@@ -92,8 +92,12 @@ void disassembleFrame(const char *marker)
-     PyErr_Restore(error_type, error_value, error_traceback);
- }
--// python 3.12
--static int const CALL = 171;
-+// Python 3.13
-+static int const LOAD_ATTR_313 = 82;
-+static int const CALL_313 = 53;
-+static int const PUSH_NULL_313 = 34;
-+// Python 3.12
-+static int const CALL_312 = 171;
- // Python 3.11
- static int const PRECALL = 166;
- // we have "big instructions" with gaps after them
-@@ -105,13 +109,16 @@ static int const LOAD_METHOD = 160;
- static int const CALL_METHOD = 161;
- // Python 3.6
- static int const CALL_FUNCTION = 131;
--static int const LOAD_ATTR = 106;
-+static int const LOAD_ATTR_312 = 106;
- // NoGil (how long will this exist in this form?)
- static int const LOAD_METHOD_NOGIL = 55;
- static int const CALL_METHOD_NOGIL = 72;
- static bool currentOpcode_Is_CallMethNoArgs()
- {
-+    static auto number = _PepRuntimeVersion();
-+    static int LOAD_ATTR = number < 0x030D00 ? LOAD_ATTR_312 : LOAD_ATTR_313;
-+    static int CALL = number < 0x030D00 ? CALL_312 : CALL_313;
-     // PYSIDE-2221: Special case for the NoGil version:
-     //              Find out if we have such a version.
-     //              We could also ask the variable `Py_NOGIL`.
-@@ -150,7 +157,6 @@ static bool currentOpcode_Is_CallMethNoArgs()
-     }
-     uint8_t opcode2 = co_code[f_lasti + 2];
-     uint8_t oparg2 = co_code[f_lasti + 3];
--    static auto number = _PepRuntimeVersion();
-     if (number < 0x030B00)
-         return opcode1 == LOAD_METHOD && opcode2 == CALL_METHOD && oparg2 == 0;
-@@ -160,7 +166,7 @@ static bool currentOpcode_Is_CallMethNoArgs()
-         //       don't need to take care of them.
-         if (opcode1 == LOAD_METHOD)
-             f_lasti += LOAD_METHOD_GAP_311;
--        else if (opcode1 == LOAD_ATTR)
-+        else if (opcode1 == LOAD_ATTR_312)
-             f_lasti += LOAD_ATTR_GAP_311;
-         else
-             return false;
-@@ -178,6 +184,11 @@ static bool currentOpcode_Is_CallMethNoArgs()
-     else
-         return false;
-+    if (number >= 0x030D00) {
-+        int opcode3 = co_code[f_lasti + 2];
-+        if (opcode3 == PUSH_NULL_313)
-+            f_lasti += 2;
-+    }
-     opcode2 = co_code[f_lasti + 2];
-     oparg2 = co_code[f_lasti + 3];
-diff --git a/sources/shiboken6/libshiboken/sbkmodule.cpp b/sources/shiboken6/libshiboken/sbkmodule.cpp
-index adcd675..7891fde 100644
---- a/sources/shiboken6/libshiboken/sbkmodule.cpp
-+++ b/sources/shiboken6/libshiboken/sbkmodule.cpp
-@@ -209,6 +209,9 @@ static PyMethodDef module_methods[] = {
- // Python 3.8 - 3.12
- static int const LOAD_CONST_312 = 100;
- static int const IMPORT_NAME_312 = 108;
-+// Python 3.13
-+static int const LOAD_CONST_313 = 83;
-+static int const IMPORT_NAME_313 = 75;
- static bool isImportStar(PyObject *module)
- {
-@@ -221,6 +224,9 @@ static bool isImportStar(PyObject *module)
-     static PyObject *const _co_consts = Shiboken::String::createStaticString("co_consts");
-     static PyObject *const _co_names = Shiboken::String::createStaticString("co_names");
-+    static int LOAD_CONST = _PepRuntimeVersion() < 0x030D00 ? LOAD_CONST_312 : LOAD_CONST_313;
-+    static int IMPORT_NAME = _PepRuntimeVersion() < 0x030D00 ? IMPORT_NAME_312 : IMPORT_NAME_313;
-+
-     auto *obFrame = reinterpret_cast<PyObject *>(PyEval_GetFrame());
-     if (obFrame == nullptr)
-         return true;            // better assume worst-case.
-@@ -240,7 +246,7 @@ static bool isImportStar(PyObject *module)
-         PyBytes_AsStringAndSize(dec_co_code, &co_code, &code_len);
-         uint8_t opcode2 = co_code[f_lasti];
-         uint8_t opcode1 = co_code[f_lasti - 2];
--        if (opcode1 == LOAD_CONST_312 && opcode2 == IMPORT_NAME_312) {
-+        if (opcode1 == LOAD_CONST && opcode2 == IMPORT_NAME) {
-             uint8_t oparg1 = co_code[f_lasti - 1];
-             uint8_t oparg2 = co_code[f_lasti + 1];
-             AutoDecRef dec_co_consts(PyObject_GetAttr(dec_f_code, _co_consts));
-@@ -458,7 +464,6 @@ PyObject *create(const char * /* modName */, void *moduleData)
-         Py_INCREF(origImportFunc);
-         AutoDecRef func(PyCFunction_NewEx(lazy_methods, nullptr, nullptr));
-         PyDict_SetItemString(builtins, "__import__", func);
--        // Everything is set.
-         lazy_init = true;
-     }
-     // PYSIDE-2404: Nuitka inserts some additional code in standalone mode
index 0bb921d8d67ef0dcf28881b29d8e43c634b33406..4bc22403bee302e6f9ecbe1efdca8d6ca8b35a17 100644 (file)
@@ -7,5 +7,3 @@
 0007-XFAIL-a-new-test-failure-with-6.7.2.patch
 0008-XFAIL-smart-smart_pointer.patch
 0009-XFAIL-QtQml-qquickitem_grabToImage.patch
-0010-Add-Python-3.13-as-supported-version.patch
-0011-Upstream-patch-for-3.13-opcodes.patch